home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12929 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.6 KB  |  66 lines

  1. Newsgroups: comp.lang.c++,comp.lang.eiffel,comp.lang.c,comp.object,comp.software-eng
  2. Path: in2.uu.net!world!tej
  3. From: tej@world.std.com (Thomas E Janzen)
  4. Subject: Re: Portability of code & skills (Beware of "C" Hackers etc)
  5. Message-ID: <DooBwC.8C0@world.std.com>
  6. Followup-To: <grp@dmu.ac.uk>
  7. Summary: I think C does some of these things you said it didn't
  8. Sender: tej@world.std.com
  9. Organization: The World Public Access UNIX, Brookline, MA
  10. References: <31494D29.4D4B@dmu.ac.uk> <DoG3HE.48E@assip.csasyd.oz> <31517E6F.5930@dmu.ac.uk>
  11. Date: Fri, 22 Mar 1996 14:50:36 GMT
  12.  
  13. Well, I don't Really wish to defend C very much, but I think some of these
  14. assertions are wrong:
  15.  
  16. In article <31517E6F.5930@dmu.ac.uk>, Graham Perkins  <grp@dmu.ac.uk> wrote:
  17. >Don Harrison wrote:
  18. >confuse the two.  For example, local functions give a certain power,
  19. >expecially if you can pass them as parameter as in Pascal.  This power
  20.  
  21. I don't remember enough Pascal to know what you mean.  I know you could
  22. define a function inside a function, making Pascal block-structured.
  23. C can't do that, but of course you can pass functions as arguments of
  24. functions.
  25.  
  26. >C does not even check
  27. >you pass the same number of print items as you specify, never mind give
  28.  
  29. Of course it does.  If I use gcc 2.6.94-q4 with -Wall -ansi
  30. with a line of C that says printf("hi %d %d\n", 5);
  31. I get: p.c:16: warning: too few arguments for format
  32.  
  33. >No assertions
  34. I know it's dumb but what's wrong with assert() from assert.h?
  35.  
  36. >concurrency, or
  37.  
  38. True, you need to go to system calls for that, but that  keeps changing;
  39. it is probably good that the language didn't tie us down to a particular
  40. paradigm; that's why it's missing from C++ also.
  41.  
  42. > No built in string, vector, matrix, or complex operations.
  43. Basically, I'd say C is a language with an internationally defined library,
  44. and that library has string operations.  The fact is, if you do a string
  45. operation in Pascal, you really are merely invoking a library call,
  46. on the VMS compiler I remember.
  47.  
  48. >No opaque types
  49. a pointer to an empty struct declaration works fine.
  50. The header has  the empty struct declaration for the client to see and 
  51. the implementation module has the full struct definition and service
  52. functions.
  53.  
  54. >Think of any powerful
  55. >construct you like from any language and you will find it NOT in C (or
  56. >at least not during the period C was catching on).
  57.  
  58. If you're going to compare Ada 95 to C '72, what's the point?
  59.  
  60.  
  61. -- 
  62. Tom Janzen - tej@world.std.com USA Distributed Real-Time Data Acquisition S/W
  63. for Scientists and Engineers using POSIX, C, C++, X, Motif, Graphics, Audio
  64. http://world.std.com/~tej
  65.  
  66.